<%@page import="org.jeecgframework.web.util.StaticValue"%>
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
<head>
	<title>分派巡检计划</title>
	<t:base type="jquery,easyui,tools,DatePicker"></t:base>
	<script type="text/javascript" src="plug-in/ckfinder/ckfinder.js"></script>
</head>
<body>
<t:formvalid formid="generatePlan" action="zyInspectionPlanController.do?doBatchSendPlan" dialog="true" layout="table" tiptype="3" beforeSubmit="progress" callback="closeProgress">
	<input type="hidden" name="planIds" value="${zyIp.id }"/>
	<table>
		<tr>
			<td colspan="2" align="center">您已选择了${ipCount}个巡检计划</td>
		</tr>
		<tr>
			<td style="width: 35px;">
				<label>备注:</label>
			</td>
			<td>
				<span><textarea name="remarks" rows="9" cols="62" datatype="*1-500" maxlength="500">${zyIp.remarks }</textarea></span>
			</td>
		</tr>
	</table>
</t:formvalid>
</body>
<script type="text/javascript">
$(function(){
	setTimeout(function(){
		if(top.myWindow == undefined){
			tip("获取巡检计划ID失败，请重新操作");
			setTimeout(function(){
				frameElement.api.close();
			},2000);
		}else{
				var datas = top.myWindow.$("#zySendInspectionPlanList").datagrid("getSelections");
				var planIdsArr = new Array();
				$(datas).each(function(i,item){
					planIdsArr.push(item.id);
				});
				if(planIdsArr.length == 0){
					tip("获取巡检计划ID失败，请重新操作");
					setTimeout(function(){
						frameElement.api.close();
					},2000);
				}
				$("input[name='planIds']").val(planIdsArr.join(","));
		}
	},1000);//一秒延时，等待dialog init 初始化 myWindow
});
function progress(){
	if($("input[name='planIds']").val() == ""){
		tip("获取巡检计划ID失败，请重新操作");
		setTimeout(function(){
			frameElement.api.close();
		},2000);
		return false;
	}
	lockmask(true);
}
</script>
